This reverts commit
30fa1426cfec1d83aab2640db06e19e104d5a5d7.
See the bugs
https://bugzilla.gnome.org/show_bug.cgi?id=724067
https://bugzilla.gnome.org/show_bug.cgi?id=723740
for the issues that are the reason for this revert.
if (attributes_mask & GDK_WA_VISUAL)
window->visual = attributes->visual;
else
- window->visual = gdk_screen_get_preferred_visual (screen);
+ window->visual = gdk_screen_get_system_visual (screen);
window->event_mask = attributes->event_mask;
g_warning ("Ignoring visual set on widget `%s' that is not on the correct screen.",
gtk_widget_get_name (widget));
}
- }
- return gdk_screen_get_preferred_visual (screen);
+ visual = gdk_screen_get_rgba_visual (screen);
+
+ if (visual == NULL ||
+ g_strcmp0 (g_getenv ("GDK_RGBA"), "0") != 0)
+ visual = gdk_screen_get_system_visual (screen);
+
+ return visual;
}
/**